function showOrHideMenu(MenuId) {
 if (document.getElementById(MenuId).innerHTML == "") {
  document.getElementById(MenuId).innerHTML = "<a href='addWordMenu.php'>Word</a><a href='addUser.php?f=form'>User</a>"
 }

 else {
  document.getElementById(MenuId).innerHTML = ""
 }
}


function showIndex() {
var contents = "<h1>Welcome to LIND!</h1>"

contents = contents + "<p>LIND is a new way to learn foreign words. The technique of learning is based on words that users add to the database and LIND asks then. There is no need for dictionaries, because LIND tells the right appearance of the word if users have forgotten it. Even more, LIND doesn't just casually pick up a word. It counts which words have to be practiced more and which user remember well enought.</p>"

contents = contents + "<p>LIND is server based and uses <a href='http://www.php.net'>PHP</a> and AJAX to render pages and <a href='http://www.mysql.com/'>MySQL</a> database server to storage data.</p>"

contents = contents + "<h1>Where to get it?</h1>"

contents = contents + "<p>LIND is an open source project and you have the right to copy, modify and distribute it under <a href='http://www.gnu.org/copyleft/gpl.html'>General Puplic Licence</a>.<!-- You can also support the development of LIND: You can join our coding team, help translating and give feedback or ideas.--> </p>"

contents = contents + "<p><a href='miscs/LIND1.0Alpha1'>Copy the source</a></p>"

document.getElementById("bodybox").innerHTML = contents
}


function showAddUser() {
var contents = "<h1>Add user</h1>"

contents = contents + "<table border='0'>"

contents = contents + "<tr><td><p>Username:</p></td><td><input id='username' onBlur='checkForDublicateUsername(this.value)' type='text' maxlength='30' size='20' /></td></tr>"

contents = contents + "<tr><td><p>Password:</p></td><td><input type='password' id='password' maxlength='30' size='20' /></td></tr>"

contents = contents + "</table><br /><input onClick='addUser()' type='button' value='->'>"

document.getElementById("bodybox").innerHTML = contents
}


function showImage(path, id) {
 document.getElementById(id).src = path
}


function hideImage(path, id) {
 document.getElementById(id).src = path
}